<!-- 登录界面 -->
<template>
  <div id="body" class="homePage">
    <log-in-switcher style="position: absolute;top: 5px;right: 5px;z-index: 1"/>
    <vue-particles
      class="login-bg"
      color="#39AFFD"
      :particleOpacity="0.7"
      :particlesNumber="100"
      shapeType="circle"
      :particleSize="4"
      linesColor="#8DD1FE"
      :linesWidth="1"
      :lineLinked="true"
      :lineOpacity="0.4"
      :linesDistance="150"
      :moveSpeed="3"
      :hoverEffect="true"
      hoverMode="grab"
      :clickEffect="true"
      clickMode="push"
    >
    </vue-particles>
    <div class="login_page" id="loginForm">
      <transition name="form-fade" mode="in-out">
        <section class="form_container" v-show="true">
          <div class="rightImg">
            <div class="right_top">
              <div class="one_title">后台管理系统</div>
              <div class="two_title">Login Account</div>
            </div>
            <el-form
              :model="formLogin"
              :rules="rules"
              status-icon
              ref="formLogin"
              class="right_container"
              @keyup.enter.native="login()"
            >
              <el-form-item prop="username">
                <el-input
                  v-model="formLogin.username"
                  style="width: 260px"
                  placeholder="请输入用户名"
                  v-focus
                ></el-input>
              </el-form-item>
              <el-form-item prop="password">
                <el-input
                  type="password"
                  style="width: 260px"
                  placeholder="密码"
                  show-password
                  v-model="formLogin.password"
                ></el-input>
              </el-form-item>
              <el-form-item>
                <el-button
                  type="primary"
                  @click="login()"
                  class="submit_btn"
                  id="button_login"
                  >登录</el-button
                >
              </el-form-item>
            </el-form>
            <div class="input_left"></div>
            <div class="input_left1"></div>
          </div>
          <div class="leftImg">
            <p class="login"></p>
            <div class="one_title">Nice to see you again</div>
            <div class="two_title">**********有限责任公司 </div>
          </div>
        </section>
      </transition>
    </div>
  </div>

</template>

<script src="./login.js"/>

<style scoped>
.login-bg {
  background: url(../../../assets/bg.jpg) no-repeat center;
  position: absolute;
  height: 100%;
  width: 100%;
}
.manage_tip {
  height: 60px;
}
.el-form-item {
  margin-bottom: 24px !important;
}
/deep/ .el-form-item__error{
  padding-top: 6px;
  left: 4px;
}
.manage_tip p {
  float: left;
  height: 60px;
}
.leftImg {
  position: relative;
  top: -96px;
  width: 320px;
  height: 420px;
  background: #467fa0;
  background: url(../../../assets/left_img.png) no-repeat center;
  background-size: auto 120%;
  left: -80px;
}
.leftImg .one_title {
  width: 240px;
  color: white;
  left: 80px;
  text-align: center;
  font-size: 10px;
  position: relative;
  top: 125px;
}
.leftImg .two_title {
  width: 298px;
  color: white;
  left: 22px;
  text-align: center;
  font-size: 24px;
  position: relative;
  top: 155px;
  white-space: nowrap;
}
.rightImg {
  position: relative;
  top: -80px;
  width: 320px;
  height: 420px;
  background: white;
  float: right;
  left: 80px;
}
.right_top {
  width: 270px;
  height: 120px;
  background: white;
}
.rightImg .right_top .one_title {
  color: #0079f4;
  font-size: 25px;
  position: relative;
  top: 20px;
  left: 20px;
}
.rightImg .right_top .two_title {
  color: #0079f4;
  position: relative;
  top: 25px;
  left: 20px;
}
.right_container {
  width: 270px;
  height: 240px;
  margin-top: 30px;
  margin-left: 25px;
}
.login {
  background: #467fa0;
  position: relative;
  top: 25px;
  left: 68px;
  width: 300px;
  height: 55px;
  background: url(../../../assets/logo.png) no-repeat 0 0;
  background-size: 63%;
}
/deep/.el-input__inner {
  border: 1px solid #ebeef5;
  border-radius: 0;
  height: 36px;
  line-height: 36px;
}
.input_left {
  width: 6px;
  height: 40px;
  background: #0079f4;
  position: relative;
  top: -240px;
  left: 31px;
  border-radius: 3px 0 0 3px;
}
.input_left1 {
  width: 6px;
  height: 40px;
  background: #0079f4;
  position: relative;
  top: -216px;
  left: 31px;
  border-radius: 3px 0 0 3px;
}
.homePage {
  position: relative;
  height: 100%;
  width: 100%;
}
.login_page {
  position: absolute;
  width: 800px;
  height: 600px;
  top: 50%;
  left: 50%;
  margin-left: -400px;
  margin-top: -300px;
}
.form_container {
  padding: 20px;
  margin: 20px;
  width: 480px;
  height: 250px;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-left: -270px;
  margin-top: -155px;
  border-radius: 5px;
  text-align: center;
  z-index: 1;
}
.submit_btn {
  width: 270px;
  font-size: 16px;
  height: 35px;
  margin: 0 auto;
  line-height: 10px;
  position: relative;
  top: 20px;
}
</style>
